// @ts-ignore
/* eslint-disable */
import request from "@/utils/http";

/** 生成令牌 生成令牌 POST /api/token/generate */
export async function generateToken(
  body: Api.TokenGenerationCommand,
  options?: { [key: string]: any }
) {
  return request<Api.Result1TokenResponse>("/api/token/generate", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 刷新令牌 刷新令牌 POST /api/token/refresh */
export async function refreshToken(
  body: Api.RefreshTokenCommand,
  options?: { [key: string]: any }
) {
  return request<Api.Result1TokenResponse>("/api/token/refresh", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
